﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ClassLibrary.BLL;

namespace WindowsFormsApplication1
{
    public partial class QuanLyDonHang : Form
    {
        public QuanLyDonHang()
        {
            InitializeComponent();
        }
        List<BLLDonHang> listdh = new List<BLLDonHang>();
        private void QuanLyDonHang_Load(object sender, EventArgs e)
        {
            GVDH.AutoGenerateColumns = false;
            listdh = new BLLDonHang().GetAll();
            GVDH.DataSource = listdh;

        }

        private void btnchitiet_Click(object sender, EventArgs e)
        {
            BLLDonHang donhang = new BLLDonHang(Convert.ToInt32(GVDH.SelectedCells[0].Value),Convert.ToInt32(GVDH.SelectedCells[4].Value));
            ChiTietDonHang fct = new ChiTietDonHang(donhang);
            fct.Show();
        }

    }
}
